import 'package:flutter/material.dart';
import 'package:gzmall_app/common/color_common.dart';

class RootCategoryListItem extends StatelessWidget {
  var category;
  var checked;

  RootCategoryListItem(category, checked) {
    this.category = category;
    this.checked = checked;
  }

  @override
  Widget build(BuildContext context) {
    return new Container(
      width: 100.0,
      height: 60.0,
      color: checked ? Colors.white : ColorCommon.grey10,
      child: new Row(
        children: <Widget>[
          new Container(
            width: 6.0,
            height: 18.0,
            color: checked ? ColorCommon.primaryColor : ColorCommon.grey10,
          ),
          new Expanded(
            child: new Center(
                child: new Text(
              category['name'],
              style: TextStyle(
                  fontSize: checked ? 14.0 : 14.0,
                  color: checked ? ColorCommon.primaryColor : ColorCommon.grey8),
            )),
          )
        ],
      ),
    );
  }
}
